{#
 # ---------------------------------------------------------------------
 #
 # GLPI - Gestionnaire Libre de Parc Informatique
 #
 # http://glpi-project.org
 #
 # @copyright 2015-2025 Teclib' and contributors.
 # @copyright 2003-2014 by the INDEPNET Development Team.
 # @licence   https://www.gnu.org/licenses/gpl-3.0.html
 #
 # ---------------------------------------------------------------------
 #
 # LICENSE
 #
 # This file is part of GLPI.
 #
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation, either version 3 of the License, or
 # (at your option) any later version.
 #
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <https://www.gnu.org/licenses/>.
 #
 # ---------------------------------------------------------------------
 #}

{% import 'components/form/fields_macros.html.twig' as fields %}

<div class="py-2 px-3 container-narrow ms-0">
    <h2 class="d-flex align-items-center">
        <i class="{{ icon }} me-2"></i>
        {{ __("Service catalog configuration") }}
    </h2>

    <form
        method="POST"
        action="{{ form.getFormURL() }}"
        data-submit-once
    >
        <div class="row">
            <div class="col-lg-9 col-12">
                {{ fields.textareaField(
                    'description',
                    form.fields.description,
                    __('Description'),
                    {
                        'is_horizontal': false,
                        'full_width' : true,
                        'enable_richtext': true,
                        'enable_images': false,
                    }
                ) }}
            </div>

            <div class="col-lg-3 col-12">
              {{ fields.illustrationField(
                    'illustration',
                    form.getServiceCatalogItemIllustration(),
                    __('Illustration'),
                    {
                        'is_horizontal': false,
                        'full_width' : true,
                    }
                ) }}
            </div>
        </div>

        {{ fields.dropdownField(
            'Glpi\\Form\\Category',
            'forms_categories_id',
            form.fields.forms_categories_id,
            _n('Category', 'Categories', 1),
            {
                'is_horizontal': false,
                'full_width' : true,
            }
        ) }}

        {# Hidden values #}
        <input type="hidden" name="_glpi_csrf_token" value="{{ csrf_token() }}" />
        <input type="hidden" name="id" value="{{ form.getID() }}" />

        {# Actions #}
        <div class="d-flex mt-4">
            <button type="submit" name="update" class="btn btn-primary ms-auto">
                <i class="ti ti-device-floppy me-1 "></i>
                {{ __("Save changes") }}
            </button>
        </div>
    </form>
</div>
